<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/common/tags.jsp"%>
<div class="paginatorBar">
	<form id="pagerForm" name="pageForm" method="post" action="${pagerUrl}">
		<input type="hidden" name="pageIndex" />
		 <input type="hidden" name="pageSize" value="${paginator.pageSize }" />
		  <input type="hidden" name="sort" /> <input type="hidden" name="dir" />
	</form>
	<ul class="paginator" contaiBox="${contaiBox}"
		data-index="${paginator.pageIndex}"
		data-last="${paginator.totalPages}"
		<c:if test="${not empty target}"> target="${target}"</c:if>
		<c:if test="${not empty type}"> type="${type}"</c:if>>
		<c:if
			test="${not empty paginator and not empty paginator.totalPages and  paginator.totalPages ne 0}">
			<li
				class="choosePage prevPage ${paginator.pageIndex eq 1 ? 'pageNumDisable' : ''}">上一页</li>
			<c:set var="begin">${paginator.pageIndex le  1 ? 1 : paginator.pageIndex-1 }</c:set>
			<c:set var="end">${paginator.totalPages le begin + 4 ? paginator.totalPages : begin + 4}</c:set>
			<c:forEach begin="${begin }" end="${end}" var="idx">
				<c:if test="${idx le paginator.totalPages}">
					<li
						class="pageNum ${idx  eq paginator.pageIndex ? 'pageNumActive' : '' }">${idx}</li>
				</c:if>
			</c:forEach>
			<li
				class="choosePage nextPage ${paginator.pageIndex eq paginator.totalPages ? 'pageNumDisable' : ''}">下一页</li>
			<li class="pageNumDisable">共${paginator.totalPages}页</li>
		</c:if>
	</ul>
</div>
